import { reactive } from 'vue';
export const formConfig = (roles) => {
    return [
        {
            "els": [ 
                {
                    "label": "配置名称",
                    "el": "input",
                    "prop": "menu_name",
                    "place": "配置名称"
                } 
            ]
        },
        {
            "els": [
                {
                    "label": "路由名称",
                    "el": "input",
                    "prop": "path_name",
                    "place": "路由名称"
                } 
            ]
        },
        {
            "els": [ 
                {
                    "label": "顶级栏目",
                    "el": "cascader",
                    "options": roles,
                    "props": {
                        "checkStrictly": true, 
                        "value": 'id', 
                        "label": 'menu_name',
                        "children": 'children'
                    },
                    "prop": "pid",
                    "default": '请选择',
                    "checkedKeys": "checkedKeys",
                    "required": false
                }
            ]
        },
        {
            "els": [
                {
                    "label": "图标",
                    "el": "input",
                    "prop": "icon",
                    "place": "图标",
                    "required": false
                } 
            ]
        },
        {
            "els": [
                {
                    "label": "路径",
                    "el": "input",
                    "prop": "path",
                    "place": "路径",
                    "required": false
                } 
            ]
        },
        {
            "els": [
                {
                    "label": "排序",
                    "el": "input",
                    "prop": "sort",
                    "place": "排序",
                } 
            ]
        },
        {
            "els": [
                {
                    "label": "状态",
                    "el": "switch",
                    "prop": "is_show",
                    "required": false,
                }
            ]
        }
    ];
}